from time import sleep

from selenium import webdriver
from selenium.webdriver.common.by import By

driver=webdriver.Chrome()
driver.get('https://login.51job.com/login.php?loginway=0&isjump=0&lang=c&from_domain=i&url=')
driver.maximize_window()

driver.find_element(By.ID,'loginname').send_keys('15974263433')
driver.find_element(By.ID,'password').send_keys('891011Zhou')
driver.find_element(By.ID,'isread_em').click()

sleep(1)
driver.find_element(By.ID,'login_btn_withPwd').click()

sleep(5)

driver.switch_to.frame(driver.find_element(By.XPATH,'//*[@id="topIndex"]'))
# driver.switch_to.frame(driver.find_element(By.XPATH,'//*[@id="topIndex"]/div/div'))
driver.find_element(By.ID,'kwd').send_keys('软件测试')
driver.find_element(By.XPATH,'//*[@id="topIndex"]/div/div/i').click()
#
# driver.switch_to.default_content()

# driver.switch_to.frame(driver.find_elements(By.XPATH, "/html/body/div[2]/div[3]")[0])
# driver.find_element(By.XPATH,'/html/body/div[2]/div[3]/div/div[1]/div[1]/span[1]/em').click()

# lists=[]
# for i in range(1,51):
# XPATH=/html/body/div[2]/div[3]/div/div[2]/div[4]/div[1]/div[i]/div[2]/a
# list.append()

